package com.zmm.weblog.admin.controller;

import com.zmm.weblog.admin.model.vo.blog.UpdateBlogSettingReqVo;
import com.zmm.weblog.admin.model.vo.category.AddCategoryReqVo;
import com.zmm.weblog.admin.service.AdminBlogService;
import com.zmm.weblog.common.aspect.ApiOperationLog;
import com.zmm.weblog.common.utils.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:福禄寿
 * @Date:2024/5/9 下午9:02
 * @Des:weblog-springboot
 **/
@RestController
@RequestMapping("/admin/blog/settings")
@Api(tags = "Admin 博客模块")
public class AdminBlogController {

    @Autowired
    private AdminBlogService blogService;

    @PostMapping("/update")
    @ApiOperation(value = "博客设置更新")
    @ApiOperationLog(description = "博客设置更新")
    public Response updateSettingBlog(@RequestBody @Validated UpdateBlogSettingReqVo blogSettingReqVo){
        return blogService.updateSettingBlog(blogSettingReqVo);
    }

    @PostMapping("/detail")
    @ApiOperation(value = "博客获取详情接口")
    @ApiOperationLog(description = "博客获取详情接口")
    public Response detailSettingBlog(){
        return blogService.detailSettingBlog();
    }
}
